<template>
    <div class="weui-panel__bd listItem" @click="todetail(starList.id)">
        <div  class="weui-media-box weui-media-box_appmsg" hover-class="none">
            <div class="weui-media-box__hd weui-media-box__hd_in-appmsg">
                <div class="thumb"><image class="weui-media-box__thumb " :src="starList.avatar" mode="aspectFill"/></div>
            </div>
            <div class="weui-media-box__bd weui-media-box__bd_in-appmsg">
                <div class="weui-media-box__desc"> {{starList.cert.company_name}}</div>
                <div class="info">{{starList.cert.introduction}}</div>
                <div class="starTag">
                    <div class="tags" v-for="item in starList.cert.label" :key="item">{{item}}</div>
                </div>
                <div class='price'>
                    <div class="weui-cell__bd">
                        <img src="/static/images/ic_position@2x.png" alt="" class="adrIcon"> <span class="starAdr">{{starList.cert.campus}}</span>
                    </div>
                    <div class="weui-cell__ft adrjl" v-if="starList.dis">
                        距离{{starList.dis}}Km
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
export default {
  props: ["starList"],
  methods:{
    todetail(id){
      let url="../starDetail/main?id="+id;
      mpvue.navigateTo({url})
      
    }
  }
};
</script>

<style lang="scss" scoped>
.listItem {
  .tags{
    line-height:35rpx;
    background:#eaf3ff;
    border:2rpx solid #1a84fb;
    border-radius:18rpx;
    font-size:20rpx;
    font-weight:500;
    color:#1a84fb;
    display:inline-block;
    padding:0 15rpx;
    margin-top:28rpx;
    margin-right:10rpx;
  }
  .thumb {
    width: 154px;
    height: 110px;
    .weui-media-box__thumb {
      width: 154px;
      height: 110px;
    }
  }
  .weui-media-box {
      padding: 10px 15px;
  }
  .weui-media-box__hd_in-appmsg {
    width: 154px;
    height: 110px;
  }
  .weui-media-box__desc {
    font-size: 14px;
    font-weight: bold;
    color: rgba(51, 51, 51, 1);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
  }
  .info{
    font-size:12px;
    font-weight:500;
    color:rgba(102,102,102,1);
    line-height:18px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
  }
  .weui-media-box_appmsg {
    -webkit-box-align: center;
    -webkit-align-items: flex-start;
    align-items: flex-start;
  }
  .progress {
    font-size: 14px;
    font-weight: 500;
    color: #1A84FB;
    line-height: 1;
    margin-top: 7px;
  }

  .price {
    position: absolute;
    bottom: 10px;
    left: 0;
    padding-left: 180px;
    right: 15px;
    font-size: 12px;
    font-weight: 400;
    color: #666666;
    display: flex;
    justify-content: flex-end;
    .adrIcon{
        width:12px;
        height:13px;
        margin-left: 0;
        vertical-align: middle;
    }
    .starAdr{
      display: inline-block;
      overflow: hidden;
      text-overflow:ellipsis;
      white-space: nowrap;
      width: 140rpx;
      vertical-align: middle;
    }
    .adrjl{
        font-size:10px;
        font-weight:500;
        color:#E9B55E;
        font-size: 14px;
        overflow: hidden;
        text-overflow:ellipsis;
        white-space: nowrap;
        width: 180rpx;
    }
  }
  .weui-media-box::after {
    position: absolute;
    bottom: 0;
    right: 15px;
    left: 15px;
    border-bottom: 1px solid #ddd;
    content: "";
  }
}
.listItem:nth-last-child(1) .weui-media-box::after{
    border-bottom:none;
}
</style>
